import java.io.PrintStream;
import java.nio.charset.Charset;

public class Task {

    public static void main(String[] args) {
        final String fileName = "lesson9/task16/resource/itheima.txt";
        run(fileName);
    }

    public static void run(String fileName) {
        try (
                PrintStream ps = new PrintStream(fileName, Charset.forName("GBK"));
        ) {
            
            ps.println("你好世界");
            ps.println("Hello, world!");
            ps.println('a');
            ps.println(12.34);
            ps.println(true);
            
            ps.write(new byte[] { 65, 66, 67 });
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}